import { AxiosPromise } from 'axios'
import request from '/@/utils/request'
const prefix = '/api/dms/refund/'
const prefixs = '/api/dms/refundOrder/'

// 售后列表
export const getRefundList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })
// 售后搜索选项
export const getRefundOption: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}option`, { data })
// 创建
export const getRefundCreate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}create`, { data })
// 售后销售订单列表
export const getRefundOrderList: (data: object) => AxiosPromise = (data) =>
  request(`${prefixs}lists`, { data })
// 销售订单回传 info
export const getRefundOrderInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefixs}info`, { data })
// 售后订单取消   cancel
export const getRefundCancel: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}cancel`, { data })
// 售后详情  info
export const getRefundInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}info`, { data })
// 售后变更 change
export const getRefundChange: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}change`, { data })
// 售后理由选项
export const getRefundReasonOption: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}reasonOption`, { data })
// 新增售后理由选项
export const getRefundAddReasonOption: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}addReasonOption`, { data })
//销售订单回传  infoByOrderDetail
export const getRefundInfoByOrderDetail: (data: object) => AxiosPromise = (data) =>
  request(`${prefixs}infoByOrderDetail`, { data })
// 获取父级订单编号 getGroupOrderoption
export const getGroupOrderoption: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}getGroupOrderoption`, { data })
//订单编号下拉选项
export const getOrderOption: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}getOrderOption`, { data })
//销售售后单编号下拉选项
export const getRefundAfterOpton: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}getRefundAfterOpton`, { data })
// 确认收货
export const getRefundReceiving: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}receiving`, { data })
